﻿using MediatR;
using Medical.Api.Write.Application.Command.Wms.WmsStoresCommand;
using Medical.Api.Write.Service.WmsService;
using Medical.ErrorCode;
using System.Threading;
using System.Threading.Tasks;

namespace Medical.Api.Write.Application.Handler.Wms.WmsStoresHandler
{
    /// <summary>
    /// 存放解决
    /// </summary>
    public class StoreShelveHandler : IRequestHandler<StoreShelveCommand, ApiResult<bool>>
    {
        private readonly IWmsService _service;
        public StoreShelveHandler(IWmsService service)
        {
            _service = service;
        }
        public async Task<ApiResult<bool>> Handle(StoreShelveCommand request, CancellationToken cancellationToken)
        {
            return await _service.MaterialStoreShelveAsync(request);
        }
    }
}
